/*
 * @Author: zhangyang
 * @Date: 2022-04-14 19:15:46
 * @LastEditTime: 2022-04-14 19:51:49
 * @Description: 导航守卫
 */
import type { UserModule } from '~/typings/base';
import NProgress from 'nprogress';
export const install: UserModule = ({ app, router, isClient }) => {
  if (isClient) {
    router.beforeEach(() => {
      NProgress.start();
    });
    router.afterEach(() => {
      NProgress.done();
    });
  }
}